package com.shujia.day18;


/*
    休眠线程
    public static void sleep(long millis)

 */
class MyThread2 extends Thread{
    @Override
    public void run() {
        System.out.println("我是李刚，现在开始睡觉了...");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("我醒了，现在开始学习！！");
    }
}
public class ThreadDemo2 {
    public static void main(String[] args) {
        MyThread2 myThread2 = new MyThread2();
        myThread2.start();
    }
}
